package ec.edu.udla.fichamedica.domain;

import java.util.Date;

import javax.jdo.annotations.Column;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * @author Paul Cahue\u00F1as
 * @version 1.0
 * @created 27-jun-2010 15:48:39
 */

@javax.persistence.Entity
@MappedSuperclass
public class Entity  implements IsSerializable{

	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	
	@Column
	private String pin;
	
	@Column
	@Enumerated(EnumType.STRING)
	private DocumentType documentType;
	
	@Column
	private Integer deleted;
	
	@Column
	private Date lastUpdate;

	public Integer getDeleted() {
		return deleted;
	}

	public void setDeleted(Integer deleted) {
		this.deleted = deleted;
	}

	public Date getLastUpdate() {
		return lastUpdate;
	}

	public void setLastUpdate(Date lastUpdate) {
		this.lastUpdate = lastUpdate;
	}
	
	public Entity(){

	}

	@Override
	public void finalize() throws Throwable {

	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getPin() {
		return pin;
	}

	public void setPin(String pin) {
		this.pin = pin;
	}

	public DocumentType getDocumentType() {
		return documentType;
	}

	public void setDocumentType(DocumentType documentType) {
		this.documentType = documentType;
	}

}